//
// Created by lvyer on 2021/12/2.
//

#ifndef OPENGLCSUPER_ABSTRACTBASEFILTER_H
#define OPENGLCSUPER_ABSTRACTBASEFILTER_H

#include <GLES3/gl3.h>


class AbstractBaseFilter {
public:
    //接口必须定义纯虚析构函数，否则外部delete的时候子类析构函数将不会被调用
    virtual ~AbstractBaseFilter() = default;

    // 纯虚函数
    virtual void initFilter() = 0;

    virtual void changerFilter(int width, int height) = 0;

    virtual int drawFilter(int textureId) = 0;

protected:
    GLuint m_ProgramObj;
    GLuint m_VertexShader;
    GLuint m_FragmentShader;
    GLuint m_FboId;
    GLuint m_FboTextureId;
    int width;
    int height;

};

#endif //OPENGLCSUPER_ABSTRACTBASEFILTER_H
